// http://www.axios-js.com/zh-cn/docs/
import axios from 'axios'
const isDev = process.env.NODE_ENV === 'development'

const request = axios.create({
  baseURL: isDev ? 'http://121.89.205.189/admin' : 'http://121.89.205.189/admin',
  timeout: 6000 // 网络超时时间
})
request.interceptors.request.use((config) => {
  return config
}, (error) => {
  return Promise.reject(error)
})
request.interceptors.response.use((response) => {
  return response
}, (error) => {
  return Promise.reject(error)
})

// 暴露自定义的axios
export default request
